home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / OutOfPhase1.01Source / OutOfPhase Folder / TrackList.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-01  |  5.3 KB  |  155 lines  |  [TEXT/KAHL]

  1. /* TrackList.h */
  2.  
  3. #ifndef Included_TrackList_h
  4. #define Included_TrackList_h
  5.  
  6. /* TrackList module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* Screen */
  12. /* EventLoop */
  13. /* StringList */
  14. /* Array */
  15. /* Memory */
  16. /* TrackObject */
  17. /* Alert */
  18. /* DataMunging */
  19. /* Menus */
  20. /* MainWindowStuff */
  21. /* BufferedFileInput */
  22. /* BufferedFileOutput */
  23. /* Files */
  24. /* Scrap */
  25. /* TrackBackgroundSaver */
  26.  
  27. #include "Screen.h"
  28. #include "EventLoop.h"
  29. #include "MainWindowStuff.h"
  30.  
  31. struct TrackListRec;
  32. typedef struct TrackListRec TrackListRec;
  33.  
  34. /* forward declarations */
  35. struct MainWindowRec;
  36. struct CodeCenterRec;
  37. struct TrackObjectRec;
  38. struct MenuType;
  39. struct MenuItemType;
  40. struct ArrayRec;
  41. struct BufferedInputRec;
  42. struct BufferedOutputRec;
  43. struct FileType;
  44.  
  45. /* create a new track list */
  46. TrackListRec*                NewTrackList(struct MainWindowRec* MainWindow,
  47.                                             struct CodeCenterRec* CodeCenter, WinType* ScreenID,
  48.                                             OrdType XLoc, OrdType YLoc, OrdType Width, OrdType Height);
  49.  
  50. /* delete the track list and all of the tracks it contains */
  51. void                                DisposeTrackList(TrackListRec* TrackList);
  52.  
  53. /* change the location of the track list in the window */
  54. void                                SetTrackListLocation(TrackListRec* TrackList,
  55.                                             OrdType XLoc, OrdType YLoc, OrdType Width, OrdType Height);
  56.  
  57. /* redraw the list */
  58. void                                TrackListRedraw(TrackListRec* TrackList);
  59.  
  60. /* see if the specified coordinates falls inside the track list rectangle */
  61. MyBoolean                        TrackListHitTest(TrackListRec* TrackList,
  62.                                             OrdType XLoc, OrdType YLoc);
  63.  
  64. /* handle a mouse down event for the track list */
  65. void                                TrackListDoMouseDown(TrackListRec* TrackList,
  66.                                             OrdType XLoc, OrdType YLoc, ModifierFlags Modifiers);
  67.  
  68. /* called when the window becomes active */
  69. void                                TrackListBecomeActive(TrackListRec* TrackList);
  70.  
  71. /* called when the window becomes inactive */
  72. void                                TrackListBecomeInactive(TrackListRec* TrackList);
  73.  
  74. /* called when a selection is made in another list, so that this list */
  75. /* is deselected */
  76. void                                TrackListDeselect(TrackListRec* TrackList);
  77.  
  78. /* check to see if there is a selection in this list */
  79. MyBoolean                        TrackListIsThereSelection(TrackListRec* TrackList);
  80.  
  81. /* check to see if any of the tracks contained in this list need to be saved */
  82. MyBoolean                        DoesTrackListNeedToBeSaved(TrackListRec* TrackList);
  83.  
  84. /* open an edit window for the selected track */
  85. void                                TrackListOpenSelection(TrackListRec* TrackList);
  86.  
  87. /* create a new track and open a window for it */
  88. void                                TrackListNewTrack(TrackListRec* TrackList);
  89.  
  90. /* delete the selected track */
  91. void                                TrackListDeleteSelection(TrackListRec* TrackList);
  92.  
  93. /* delete the explicitly specified track */
  94. void                                TrackListDeleteTrack(TrackListRec* TrackList,
  95.                                             struct TrackObjectRec* TheTrack);
  96.  
  97. /* the name of an track has changed, so the name in the scrolling */
  98. /* list must also be changed */
  99. void                                TrackListTrackNameChanged(TrackListRec* TrackList,
  100.                                             struct TrackObjectRec* TheTrack);
  101.  
  102. /* look for a specified track.  returns NIL if not found.  the name is */
  103. /* NOT null terminated */
  104. struct TrackObjectRec*    TrackListLookupNamedTrack(TrackListRec* TrackList, char* Name);
  105.  
  106. /* cancel dependencies where objects have the specified object listed in the */
  107. /* background.  this is called by the specified object when it is dying */
  108. void                                TrackListDelinkBackgroundInstances(TrackListRec* TrackList,
  109.                                             struct TrackObjectRec* TheTrack);
  110.  
  111. /* get the track menu */
  112. struct MenuType*        TrackListGetTrackMenu(TrackListRec* TrackList);
  113.  
  114. /* enable all of the menu items on the menu associated with this track list */
  115. void                                TrackListEnableMenuItems(TrackListRec* TrackList);
  116.  
  117. /* return the track object associated with the specified menu item or NIL if */
  118. /* there is no such track object */
  119. struct TrackObjectRec*    TrackListLookupMenuItem(TrackListRec* TrackList,
  120.                                             struct MenuItemType* MenuItem);
  121.  
  122. /* put a checkmark on all track menu items that occur in this list */
  123. void                                TrackListMenuItemCheckmarks(TrackListRec* TrackList,
  124.                                             struct ArrayRec* TrackObjList);
  125.  
  126. /* the document's name changed, so we need to update the windows */
  127. void                                TrackListGlobalNameChange(TrackListRec* TrackList, char* NewFilename);
  128.  
  129. /* get an array of all of the tracks.  it must be disposed of by the caller */
  130. struct ArrayRec*        TrackListGetListOfAllTracks(TrackListRec* TrackList);
  131.  
  132. /* read track data from a file.  returns True if completely successful. */
  133. FileLoadingErrors        TrackListReadData(TrackListRec* TrackList,
  134.                                             struct BufferedInputRec* Input);
  135.  
  136. /* write track data to a file.  returns True if completely successful. */
  137. FileLoadingErrors        TrackListWriteData(TrackListRec* TrackList,
  138.                                             struct BufferedOutputRec* Output);
  139.  
  140. /* after a file has been saved, this is called to mark all objects as not modified. */
  141. void                                TrackListMarkAllObjectsSaved(TrackListRec* TrackList);
  142.  
  143. /* copy the selected object in the list to the clipboard.  return False if failed. */
  144. MyBoolean                        TrackListCopyObject(TrackListRec* TrackList);
  145.  
  146. /* try to paste the clipboard in as a track.  returns False if it failed or the */
  147. /* clipboard did not contain a track. */
  148. MyBoolean                        TrackListPasteObject(TrackListRec* TrackList);
  149.  
  150. /* try to paste the track object in from the file */
  151. MyBoolean                        TrackListPasteFromFile(TrackListRec* TrackList,
  152.                                             struct FileType* File);
  153.  
  154. #endif
  155.